# -*- coding: utf-8 -*-

"""
DateTime   : 2020/12/23 15:49
Author     : ZhangYafei
Description: 
"""
from functools import partial


def mod(n, m):
    return n % m


mod_by_100 = partial(mod, 100)

print(mod(100, 7))  # 2
print(mod_by_100(7))  # 2

from functools import partial

bin2dec = partial(int, base=2)
print(bin2dec('0b10001'))  # 17
print(bin2dec('10001'))  # 17

hex2dec = partial(int, base=16)
print(hex2dec('0x67'))  # 103
print(hex2dec('67'))  # 103